package nl.saxion.act.main_menu;

import nl.saxion.act.playground.MyGameActivity;
import nl.saxion.act.playground.Prefs;
import nl.saxion.act.playground.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MenuActivity extends Activity{
	/*
	 * creates the main menu, makes 4 buttons and links them to the game view, instruction view, highscore view and setting view
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu);
		
		Button button1 = (Button) findViewById(R.id.button_game1);
		button1.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MenuActivity.this, MyGameActivity.class);
				startActivity(intent);
			}
		});
		
		Button button2 = (Button) findViewById(R.id.button_instructions);
		button2.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MenuActivity.this, InstructionActivity.class);
				startActivity(intent);
			}
		});
		
		Button button3 = (Button) findViewById(R.id.button_highscores);
		button3.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MenuActivity.this, HighscoresActivity.class);
				startActivity(intent);
			}
		});
		
		Button button4 = (Button) findViewById(R.id.button_settings);
		button4.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(MenuActivity.this, SettingsActivity.class);
				startActivity(intent);
			}
		});
		
	}
}
